package com.lpf.service.impl;

import com.lpf.annotation.ExtTransaction;
import com.lpf.dao.UserDao;
import com.lpf.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @ExtTransaction
    //@Transactional
    public void add() {
        userDao.add("test001", 20);
        // int i = 1 / 0;
        log.error("################");
        userDao.add("test002", 21);
    }

}
